package com.ethink.order.api.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;

/**
 * 采购单 新增请求对象
 *
 * @author default
 * @date 2022-11-05
 */
@Data
public class PurchaseOrderAddRequest {

    @Schema(description ="采购单号",hidden = true)
    private String orderNo;

    @Schema(description ="销售需求单号",hidden = true)
    private String saleDemandOrderNo;

    @Schema(description ="枚举 订单状态:1-草稿(s1)|2-待付款(s2)|3-待收货(s3)|4-已完结(s4)")
    private Integer orderStatus;

    @Schema(description ="供应商编码")
    private String supplierCode;

    @Schema(description ="供应商名称")
    private String supplierName;

    @Schema(description ="分仓编码")
    private String subWarehouseCode;

    @Schema(description ="分仓名称")
    private String subWarehouseName;

    @Schema(description ="外部单号")
    private String outOrderNo;

    @Schema(description ="制单人账号",hidden = true)
    private String createUserCode;

    @Schema(description ="制单人名称",hidden = true)
    private String createUserName;

    @Schema(description ="预计出境日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd")
    private Date exceptOutboundTime;

    @Schema(description = "订单来源上级")
    private String saleChannel;

    @Schema(description = "订单来源下级")
    private String saleSubChannel;

    @Schema(description ="备注")
    private String remark;

    @Schema(description = "汇率")
    private BigDecimal exchangeRate;

    @Schema(description = "订单总额")
    private BigDecimal orderPrice;

    @NotEmpty
    @Schema(description = "采购详情id")
    private List<Long> ids;

    @Schema(description ="货币编码",hidden = true)
    private String currencyCode;

    @Schema(description ="货币名称",hidden = true)
    private String currencyName;

}
